@Html.DevExpress().GridView(
    settings =>
    {
        settings.Name = "ManagerGroupsGridView";
        settings.CallbackRouteValues = new { Controller = "ManagerADGroup", Action = "ManagerGroupsGridView" };
        settings.SettingsPager.Visible = true;
        settings.SettingsPager.PageSize = 24;
        settings.Settings.ShowVerticalScrollBar = true;
        settings.Settings.VerticalScrollableHeight = 600;
        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);

        settings.Columns.Add(column =>
        {
            column.Caption = "#";
            column.SetDataItemTemplateContent(c =>
            {
                ViewContext.Writer.Write(
                    Html.ActionLink("Edit", "Edit", new { groupName = DataBinder.Eval(c.DataItem, "Name") })
                );
            });
            column.Settings.AllowDragDrop = DefaultBoolean.False;
            column.Settings.AllowSort = DefaultBoolean.False;
            column.Width = 70;
        });
        settings.Columns.Add(column => {
            column.FieldName = "Name";
            column.Caption = "Active Directory Group";
        });
        settings.Columns.Add(column =>
        {
            column.FieldName = "NamesOfMembers";
            column.Caption = "Members";
        });

        settings.ClientLayout = (s, e) =>
        {
            if (e.LayoutMode == ClientLayoutMode.Loading)
            {
                if (Session["GridState"] != null)
                    e.LayoutData = (string)Session["GridState"];
            }
            else
                Session["GridState"] = e.LayoutData;
        };

        settings.Settings.ShowFilterRow = true;
        foreach (var column in settings.Columns)
        {
            ((MVCxGridViewColumn)column).Settings.AutoFilterCondition = AutoFilterCondition.Contains;
        }
    }).Bind(Model).GetHtml()